<div class="view-header">
    <div class="search-date">
        <i class="fa fa-calendar search-date-i"></i>
        <datetimepicker class="search-date-start"
                        min-view="2"
                        end-date="search_date_end"
                        ng-model="search_date_start"></datetimepicker>
        
    </div>
    <div class="search-date">
        <i class="fa fa-calendar search-date-i"></i>
        <datetimepicker class="search-date-end"
                        min-view="2"
                        start-date="search_date_start"
                        ng-model="search_date_end"></datetimepicker>
    </div>
    <div class="view-header-left">
        <!-- 查询 -->
        <div class="view-header-item no-widen" ng-click="refresh()" title="查询" ng-show='!new_cover || !upd_cover'>
            <i class="fa fa-search"></i>
        </div>
        <!-- 增加来访记录 -->
        <div class="view-header-item color-open" ng-click="open_add_cover()" title="增加来访" ng-show='!new_cover || !upd_cover'>
            <i class="fa fa-plus"></i> 新增来访
        </div>

        <!-- 新增 -->
        <div class="view-header-item no-widen color-close above-cover" ng-click='close_cover()' title="关闭" ng-show='new_cover'>
            <i class="fa fa-close"></i>
        </div>

        <div class="view-header-item no-widen color-save above-cover" ng-click='new_save()' title="添加保存" ng-show='new_cover'>
            <i class="fa fa-save"></i>
        </div>

        <div class="view-header-item color-check above-cover"
             ng-click='forms.new.$valid ? new_submit() : {};'
             title="添加提交{{forms.new.$invalid?'请完成表单后再提交!':''}}{{forms.new.$error}}"
             ng-show='new_cover'>

            <i class="fa fa-upload" ng-show="forms.new.$valid"></i>
            <i class="fa fa-ban" ng-show="forms.new.$invalid"></i>

            {{forms.new.$invalid?'完善表单!':'提交潜客'}}
        </div>
        

        <!-- 修改 -->
        <div class="view-header-item color-close above-cover no-widen" ng-click='close_cover()' title="关闭" ng-show='upd_cover'>
            <i class="fa fa-close"></i>
        </div>
        <div class="view-header-item color-save above-cover no-widen" ng-click='upd_save()' title="修改保存" ng-show='upd_cover'>
            <i class="fa fa-save"></i>
        </div>

        <div class="view-header-item color-check above-cover"
             ng-click='debug();forms.upd.$valid?upd_submit():{};'
             title="修改提交{{forms.upd.$invalid?'请完成表单后再提交!':''}}{{forms.upd.$error | json}}"
             ng-show='upd_cover'>

            <i class="fa fa-upload" ng-show="forms.upd.$valid"></i>
            <i class="fa fa-ban" ng-show="forms.upd.$invalid"></i>

            {{forms.revise.$invalid?'完善表单!':'提交潜客'}}
        </div>
        
    </div>
</div>

<div class="view-content reception-content">
    <div ag-grid="grid" class="ag-material" style="height :100%;"></div>
</div>

<!-- 新增来访 -->
<div class="data-overlay" ng-show='new_cover'>
    <div class="overlay-container">
        <div class="overlay-header">添加来访记录</div>
        <form-reception ng-model="new_visit" form="forms.new" mode ="forms.new_mode"></form-reception>
        <!-- <ng-include src="'/modules/sales/reception/reception.new.html'"></ng-include> -->
    </div>
</div>
<!-- 修改来访 -->
<div class="data-overlay" ng-show='upd_cover'>
    <div class="overlay-container">
        <div class="overlay-header">修改来访记录</div>
        <form-reception ng-model="upd_visit" form="forms.upd" mode="forms.upd_mode"></form-reception>
        <!-- <ng-include src="'/modules/sales/reception/reception.revise.html'"></ng-include> -->
    </div>
</div>